

const state = {
    cropId:"" || sessionStorage.getItem('cropId'),
    productId:""||sessionStorage.getItem('productId')
};
const getters = {
    cropId:state=>state.cropId,
    productId:state=>state.productId,
};
const mutations = {
    UPDATE_STATE_VALUE(state,params){
        for (let key in params){
            state[key]=params[key].value
            if (params[key].session){
                sessionStorage.setItem(key,JSON.stringify(params[key].value))
            }
        }
    },
};
const actions = {
};

export default {
    namespaced: true,
    state,
    getters,
    mutations,
    actions
};
